import openpyxl

wb = openpyxl.load_workbook(r"F:\my_profile\study\code_pub\study_code_pub\python表格\合并单元格\result.xlsx")
print(wb.sheetnames)

sheet = wb.active

# sheet.merge_cells("A1:B2")
# sheet.merge_cells(start_row=3,end_row=4,start_column=1,end_column=3)

sheet.unmerge_cells("A1:B2")
sheet.unmerge_cells(start_row=3,end_row=4,start_column=1,end_column=3)


wb.save(filename="result1.xlsx")

